﻿@model Frame.Models.Main
@{
    ViewBag.Title = "HAISHAN Infomation Platform";
    ViewBag.SysInfo = "HAISHAN Infomation Platform 4.0.121203";

    ViewBag.jQuery = true;
    ViewBag.jQueryUI = true;

    ViewBag.Css = "/Content/Frame/Main.css";
    ViewBag.Js = "/Content/Frame/Main.js";
                   
    Layout = "~/Views/_Template.cshtml";
}
<div id="Top">
    <div class="Start">
        <a href="#" id="MenuStart"></a>
        <div id="StartMenu" style="display:none">
            <div class="StartTop"><div id="MenuClose"></div></div>
            <div class="StartMiddle">
                <table cellpadding="0" cellspacing="0">
                    <tr><td style="height:8px;"></td><td style="width:1px; background-color:White"></td><td style="background-color:#cfdbeb"></td><td style="background-color:White"></td><td style="background-color:#eff5fa"></td></tr>
                    <tr>
                        <td valign="top" style="width:200px;">
@{
    for (int i = 0; i < Model.MenuFrists.Count; i += 2)
    {
        if (!String.IsNullOrEmpty(Model.MenuFrists[i].Icon))
        {
                            <a href="#" id="@String.Format("MenuFirst_{0}", Model.MenuFrists[i].ID)"><img src="/Content/Frame/Images/MenuIcon/@Model.MenuFrists[i].Icon" width="32" height="32" alt="" /><span>@Model.MenuFrists[i].Name</span></a>
        }
        else
        {
                            <a href="#" id="@String.Format("MenuFirst_{0}", Model.MenuFrists[i].ID)"><img src="/Content/Frame/Images/MenuIcon/Folder.png" width="32" height="32" alt="" /><span>@Model.MenuFrists[i].Name</span></a>
        }                 
    }
}
                            <a href="/Frame/Login" id="Exit"><img src="/Content/Frame/Images/MenuIcon/LogOut.png" width="32" height="32" alt="" /><span>退出系统</span></a>
                        </td>
                        <td style="width:1px; background-color:White"></td>
                        <td style="width:1px; background-color:#C5DBEC"></td>
                        <td style="width:1px; background-color:White"></td>
                        <td valign="top" style="width:200px; background-color:#eff5fa">
@{
    for (int i = 1; i < Model.MenuFrists.Count; i += 2)
    {
        if (!String.IsNullOrEmpty(Model.MenuFrists[i].Icon))
        {
                            <a href="#" id="@String.Format("MenuFirst_{0}", Model.MenuFrists[i].ID)"><img src="/Content/Frame/Images/MenuIcon/@Model.MenuFrists[i].Icon" width="32" height="32" alt="" /><span>@Model.MenuFrists[i].Name</span></a>
        }
        else
        {
                            <a href="#" id="@String.Format("MenuFirst_{0}", Model.MenuFrists[i].ID)"><img src="/Content/Frame/Images/MenuIcon/Folder.png" width="32" height="32" alt="" /><span>@Model.MenuFrists[i].Name</span></a>
        }                    
    }
}
                        </td>
                    </tr>
                    <tr><td style="height:8px;"></td><td style="width:1px; background-color:White"></td><td style="background-color:#cfdbeb"></td><td style="background-color:White"></td><td style="background-color:#eff5fa"></td></tr>
                </table>
            </div>
            <div class="StartBottom"></div>            
        </div>
    </div>                                             
    <div class="Location" id="MenuStartName"></div>
    <div class="SysInfo">@ViewBag.SysInfo</div>        
    <div class="UserInfo">登陆时间：@DateTime.Parse(Session["AsynchronousLoginTime"].ToString()).ToString("yyyy-MM-dd HH:mm:ss")</div>
    <div class="UserInfo">当前用户：@Model.UserID</div>
</div>
<table id="Main" cellpadding="0" cellspacing="0" width="100%" style="display:none">
    <tr>
        <td id="MenuSecondPanel" valign="top"><div id="MenuSecondPanelDiv">
@{
    foreach (Frame.Models.MenuFrist m in Model.MenuFrists)
    {
            <div class="MenuSecondPanel" id="@String.Format("MenuSecond_{0}", m.ID)">
@{
        foreach (Frame.Models.MenuSecond n in m.MenuSeconds)
        {
                <a href="#" class="MenuSecond SecondNormal" id="@String.Format("MenuSecond_{0}_{1}", m.ID, n.ID)">@n.Name</a>
    
            if(n.MenuThirds.Count > 0)
            {
                <div class="MenuThird" id="@String.Format("MenuThird_{0}_{1}", m.ID, n.ID)">
                    <div class="MenuThirdList">
@{
                foreach (Frame.Models.MenuThird p in n.MenuThirds)
                {
                        <a href="@p.URL" id="@p.ID" class="ThirdNormal" target="MainFrame">@p.Name</a> 
                }
}
                    </div> 
                    <div class="MenuThirdBottom"></div>
                </div>
            }         
        }
}          
            </div>        
    }
}
        </div></td>
        <td id="MenuGap" class="MenuGapOut"><span class="ui-icon ui-icon-triangle-1-w"></span></td>
        <td><iframe id="MainFrame" name="MainFrame" src="" width="100%" frameborder="0" scrolling="auto" marginwidth="0" marginheight="0" style="visibility:visible"></iframe></td>
    </tr>
</table>